package com.server.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Author zgr
 * @create 2023/7/9 18:09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 8967832898772768560L;

    protected Integer errCode;
    protected String errMsg;

    public BusinessException(){
        super();
    }
    public BusinessException(String message) {
        super(message);
        this.errMsg = message;
    }

    public BusinessException(String message, Integer errCode) {
        super(message);
        this.errCode = errCode;
        this.errMsg = message;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }
}
